import { Component, Input, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'collection-contact',
  template: `
              <a [ngClass]="{collected: contact}"
                (click)="collectTheContact()">收藏</a>
            `
})

export class ContactCollectionComponent {
  @Input() contact: any = {};
  @Output() collect = new EventEmitter<boolean>();
  collectTheContact() {
    console.log('clicked');
    // this.collect.emit();
  }
}


